@(#) SLAVE.ins 2.1 90/01/22 13:01:12

This document describes how to install an MS-DOS pc-mail user in an
environment where the user's mail directories are mounted from a UNIX
file server, and where PC/NFS is used for file access.  It is assumed
that the UNIX host uses sendmail for message routing.  You will have to
adapt the examples if you are using different mechanisms for remote file
access or message routing.

THE UNIX SIDE

The installation of daemon programs on the file server is documented
with the source of the pc-mail and pc-maild programs (these are provided
in the `daemon' subdirectory.  The following text assumes that the
daemon programs have already been installed.

Add the user to the password data base.  In the pc-mail spool area on
the server, create a subdirectory for the pc-mail user.  The directory
must be owned by that user; for reasons of privacy, mode 0700 is
recommended.  In the following example, replace username by the actual
login name of the user, and the name of the spool area by its actual
name.

    # mkdir /var/spool/pc-mail/username
    # chown username /var/spool/pc-mail/username
    # chmod 700 /var/spool/pc-mail/username

The next step is to inform the UNIX mailer of how to deliver mail for
this user. This is described in the documentation of the pc-mail
and pc-maild programs.

After the list of pc-mail users has been updated, kill the sendmail
daemon and restart it.

Note that the sendmail program ON THE NFS SERVER will not read the
user's .forward file.  The file will still be useful, however, if the
user's home directory is exported to OTHER hosts running sendmail.  In
that case you will want to create a .forward file in the user's home
directory containing

	username@fully-qualified-hostname-of-the-mail-server

The same effect can be achieved with an alias in a network-wide alias
data base.

THE PC SIDE

Copy the appropriate makefile.whatever file to makefile and edit it.
Make sure that the DAEMON macro is defined, and that the large memory
model is selected.  You may also use the SLAVE.bat file if no decent
make utility is available.

Typing `make' should produce the following programs:

	mail, the user interface program
	cmail, checks for new mail
	nmail, extracts sender and subject from new mail
	smail, performs alias expansion and queues outgoing messages

Create a dedicated directory on the file server to install the mail
binaries.

On the PC, adjust the AUTOEXEC.BAT, NETWORK.BAT or DRIVES.BAT files so
that the following commands are executed upon startup (replace `server'
by the name of the NFS server host, and replace `username' by the login
name of the actual user):

    net name username *
    net use m: \\server\var\spool\pc-mail\username
    set MAILDIR=m:\

The trailing \ in the last command is needed, or the mail program will
complain that it "cannot access some essential data files".

Other environment variables that need to be set are:

    PATH, should include the location of the pc-mail binaries
    EDITOR, the editor command to be used; if this is a batch
	file, the `.bat' suffix should be included.

It is advisable to specify absolute path names, including drive names.

Optional environment variables are:

    MAILPRN, destination of printed output
    MAILCMD, command to be executed upon exit from the mail program.
	At our site, MAILPRN is the name of a file, and MAILCMD is
	the command that sends that file to a postscript printer. If 
	this is a batch file, the `.bat' suffix should be included.

Reboot the pc.

Test the mail programs by creating a small mail message addressed to
yourself.  Since the message will automatically be picked up by the
pc-maild daemon program on the server, the message may arrive before you
had a chance to type a DIR command!

ALIAS DATABASE

The user can define aliases for (groups of) mail addresses.  The alias
data base is a text file with on each line:

	alias replacement_part

The alias should be a single word; words are separated by blanks, tabs
or commas.  The replacement part may be one or more words.  Whenever the
smail (mail spooler) program recognizes an alias, it is replaced by the
`replacement part'.  Aliases may be defined in terms of other aliases;
the order in which they appear in the alias data base is not important
(except when an alias is defined more than once; the program remembers
only the last definition of an alias).  The alias expansion software is
smart enough to detect infinite loops and to suppress multiple
occurrances of the same recipient.  Alias substitution is not case
sensitive.

BATCH-MODE OPERATION

The cmail program can be run from a batch file (say, each time the PC is
turned on), to report if there is new mail.  Also, you may want to
auto-execute the cmail command when exiting from the interactive mail
shell (using the MAILCMD environment variable described above).

TEMPLATE FILES

The user can provide message templates with standard header and trailer
lines.  If the file "header" is present in the mail directory, its
contents will be included at the beginning of every mail message created
by the user.  Similarly, the contents of a file "trailer" will be
included at the end of mail messages.  The "header" and "trailer" files
should be ordinary text files.
